When a motor, a robot, a machine tool, or the like is controlled by means of a motor controller, a chassis section is connected to a motor. Therefore, measurement of a frequency characteristic of the chassis section connected to the motor and measurement of a mechanism characteristic including inertia of the chassis section are required.
A method for measuring the frequency characteristic of the chassis section includes a method (first related-art method) under which a high-speed sweep waveform is input as a torque command and there is measured a frequency response while the torque command is taken as an input and a motor speed is taken as an output; and a method (second related-art method) under which a high-speed sweep waveform is input as a speed command and there is measured a frequency response while the speed command is taken as an input and a motor speed is taken as an output.
First, the configuration of the motor controller for measuring the frequency characteristic of the chassis section through use of the first related-art method will now be described by reference to FIG. 1.
The related-art motor controller is constituted of a random signal generation section 15, a current control section 17, a detector 20, a differentiator 26, and a frequency response measurement section 27. The motor controller measures a frequency characteristic of a motor 18 connected to a chassis section 19.
The random signal generation section 15 generates and outputs a high-speed sweep waveform. The current control section 17 receives the high-speed sweep waveform output from the random signal generation section 15 as a torque command, converts the torque command into a current command, and controls an electric current such that the electric current supplied to the motor 18 matches the thus-converted current command, thereby driving the motor 18. The detector 20 detects a rotational position of a rotary shaft by means of being coupled to the rotary shaft of the motor 18 or the like. The differentiator 26 calculates a motor speed from the signal output from the detector 20. The frequency response measurement section 27 measures a frequency response by receiving the torque command output from the random signal generation section 15 and the motor speed calculated by the differentiator 26.
Next, the configuration of the motor controller for measuring the frequency characteristic of the chassis section through use of the second related-art method will now be described by reference to FIG. 2.
The related-art motor controller is constituted of the random signal generation section 15, a speed control section 13, a torque filter section 14, the current control section 17, the detector 20, the differentiator 26, and the frequency response measurement section 27. The motor controller measures a frequency characteristic of the motor 18 connected to the chassis section 19, as in the case of the motor controller shown in FIG. 1. In FIG. 2, those constituent elements which are the same as those shown in FIG. 1 are assigned the same reference numerals, and explanations thereof are omitted.
The speed control section 13 receives an output from the random signal generation section 15 as a speed command and performs speed control operation by generating such a torque command that the motor speed calculated by the differentiator 26 matches the speed command. The torque filter section 14 receives the torque command from the speed control section 13, thereby performing filtering operation through use of a low-pass filter or the like.
The current control section 17 employed in the second related-art method receives the torque command output from the torque filter section 14, converts the torque command into a current command, and performs current control operation such that the current supplied to the motor 18 matches the current command, thereby driving the motor 18.
The frequency response measurement section 27 employed in the second related-art method also measures a frequency response by receiving the speed command output from the random signal generation section 15 and the motor speed calculated by the differentiator 26, as in the case of the related-art motor controller shown in FIG. 1.
According to the previously-described first and second related-art methods, the frequency characteristic of the chassis section 19 connected to the motor 18 can be measured.
However, according to the first related-art method, a position loop and a speed loop are not constituted. Hence, the measurement is susceptible to random force attributable to gravity and random attributable to a frictional characteristic of the mechanism. For these reasons, in some cases, a displacement arises in the position of the motor before and after measurement of the frequency characteristic. The method requires processing for returning the position of the motor to an initial position after measurement of a frequency response, or protective means for aborting measurement of a frequency characteristic when the position of the motor has become displaced over a certain amount or more. Further, when the amount of positional displacement has become greater, there also arises a problem of the motor falling outside a movable range of the mechanism.
According to the second related-art method, occurrence of positional displacement can be essentially prevented, because a speed loop is constituted. However, since the torque command is determined so as to match the high-speed sweep waveform input as a speed command, the torque command becomes greater as a frequency of the speed command becomes higher. Eventually, torque saturation arises. In this case, measurement of the frequency response may become impossible, and there is also the risk of destruction of the motor or mechanism. If measures, such as a reduction in a speed loop gain, are taken, occurrence of such a problem can be avoided. However, if the speed loop gain is made small, the response of the speed loop will become slow, thereby presenting a problem of the inability to accurately measure the frequency characteristic of the mechanism. Further, the high-speed sweep waveform is used as a speed command, and hence the characteristic of the speed loop affects the frequency response, thereby presenting a problem of a failure to acquire an accurate frequency characteristic.
A method for identifying inertia through use of a device differing from that used for measuring a frequency characteristic has hitherto been available as a method for identifying inertia.
For instance, JP-A-61-88780 describes a device which calculates the result of integration of a torque command and the range of variation in rotational speed by changing the torque command to change the rotational speed and identifies inertia through calculatcalculation of (inertia)=(the result of integration of a torque command)/(the range of change in rotational speed). JP-A-6-70566 describes a device which inputs a speed command having a ramp section to subject a speed loop to P control (proportional control), thereby identifying load inertia from a ratio of a stationary speed variation achieved when there is no load inertia and a stationary speed variation achieved when there is load inertia.
Inertia compensation for correcting the inertia of a motor is performed through use of the inertia identified by means of such a method. Specifically, compensation of inertia is performed by previously multiplying an output of speed command by the inverse of inertia of the motor.